package com.heima.admin.controller.v1;

import com.heima.admin.service.AdService;
import com.heima.model.common.admin.dtos.ResponseAdUser;
import com.heima.model.common.admin.pojos.AdUser;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/login")
@Api(value = "admin端用户登录", tags = "ad_user", description = "admin端用户登录API")
public class AdminLoginController {

    @Autowired
    private AdService adService;

    @PostMapping("/in")
    public ResponseAdUser login(@RequestBody AdUser adUser) {
        return adService.login(adUser);
    }
}